Method: BigDecimal#>

Defined in:
bigdecimal.c

#>(other) ⇒ Boolean

Returns true if self is greater than other, false otherwise:

b = BigDecimal('1.5')
b > 1              # => true
b > 1.0            # => true
b > Rational(1, 1) # => true
b > 2              # => false

Raises an exception if the comparison cannot be made.

Returns:

  • (Boolean)


1733
1734
1735
1736
1737
# File 'bigdecimal.c', line 1733

static VALUE
BigDecimal_gt(VALUE self, VALUE r)
{
    return BigDecimalCmp(self, r, '>');
}